package com.albaba.designpattern.composite.text_002;

/**
 * @Description: TODO
 * @Author zx
 * @Date 2025/2/21 14:54
 * @Version 1.0
 */
public abstract class Entry {

    public abstract String getName();

    public abstract int getSize();

    public abstract Entry add(Entry entry);

    public abstract void printList(String prefix);

    @Override
    public String toString() {
        return getName() + "(" + getSize() + ")";
    }
}
